﻿@{
    ViewBag.Title = Local("PermissionView.PageTitle");
}

@model IDictionary<int, SecurityPermission>
           
@using (Html.BeginForm())
{ 
<div id="tabs">
    <ul>
    @foreach (var role in Mozlite.Common.Roles.GetRoles(RoleLevel.Administrator))
    {
        <li><a href="#tabs-@role.RoleID">@role.RoleName</a></li>
    }
    </ul>
    @foreach (var role in Mozlite.Common.Roles.GetRoles(RoleLevel.Administrator))
    {
    <div id="tabs-@role.RoleID">
        <div class="box">
            <label>@Local("SecurityPermission.AllowHostManagement")</label>
            <div class="right">
                @CPHelper.ShowPermissionBooleanNullable("AllowHostManagement", role.RoleID, Model[role.RoleID].AllowHostManagement)
            </div>
        </div>

        <div class="box">
            <label>@Local("SecurityPermission.AllowResetApplication")</label>
            <div class="right">
                @CPHelper.ShowPermissionBooleanNullable("AllowResetApplication", role.RoleID, Model[role.RoleID].AllowResetApplication)
            </div>
        </div>

        <div class="box">
            <label>@Local("SecurityPermission.AllowForumManagement")</label>
            <div class="right">
                @CPHelper.ShowPermissionBooleanNullable("AllowForumManagement", role.RoleID, Model[role.RoleID].AllowForumManagement)
            </div>
        </div>
    </div>
    }
</div>
    
<div class="box">
    <button>@Local("Permission.Save")</button>
</div>
}
